ERL = erl
REBAR = rebar3

all: compile
co: compile
cl: clean
# prod: production

compile:
	@$(REBAR) compile

deps:
	@$(REBAR) upgrade

.PHONY: clean
clean:
	@$(REBAR) clean

eunit:
	@$(REBAR) eunit

# .PHONY: production
# production:
# 	@.\\script\\prod.bat

run: compile
	@$(ERL) \
		+P 262144 \
		-name mqeg@127.0.0.1 \
		-setcookie 3xmg5wv6p7e8j9e2hh68kwskeps3dp68 \
		-config config/sys.config \
		-pa _build/default/lib/amqp_client/ebin \
		-pa _build/default/lib/cowboy/ebin \
		-pa _build/default/lib/cowlib/ebin \
		-pa _build/default/lib/credentials_obfuscation/ebin \
		-pa _build/default/lib/jsx/ebin \
		-pa _build/default/lib/mqeg/ebin \
		-pa _build/default/lib/rabbit_common/ebin \
		-pa _build/default/lib/ranch/ebin \
		-pa _build/default/lib/recon/ebin \
		-pa _build/default/lib/thoas/ebin \
		-s mqeg start \
		-s observer start


